package P9.T04;

import java.io.File;
import java.io.FileFilter;
import java.util.Calendar;
import java.util.Date;

public class T04 {
    public static void main(String[] args) {
        File f=new File("d:\\");
        for(File sf:f.listFiles(new FileFilter() {

            @Override
            public boolean accept(File f) {
                Calendar cal = Calendar.getInstance();
                cal.setTime(new Date(f.lastModified()));

                return cal.get(Calendar.YEAR)>=2024;
                //return f.getName().toLowerCase().startsWith("a");
            }
        })){
            System.out.println(sf.getName());
            System.out.println(new Date(sf.lastModified()).toString());
        }
    }
}
